package webEquipeRechercheGwt.client.structure;

import webEquipeRechercheGwt.client.factory.ClickHandlerFactory;
import webEquipeRechercheGwt.client.factory.WidgetFactory;

import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;

public class NavigationPanel extends VerticalPanel {

	private Label persons;
	private Label seminars;
	private Label teams;
	private Label softwares;
	private Label papers;
	private DataShowingPanel mainPanel;
	
	
	public NavigationPanel(DataShowingPanel mainPanel) {
		super();
		this.mainPanel = mainPanel;
		persons = WidgetFactory.getLabel("Person");
		seminars = WidgetFactory.getLabel("Seminar");
		teams = WidgetFactory.getLabel("Team");
		softwares = WidgetFactory.getLabel("Software");
		papers = WidgetFactory.getLabel("Paper");
		persons.addClickHandler(ClickHandlerFactory.getClickHandlerAllPerson(this.mainPanel));
		seminars.addClickHandler(ClickHandlerFactory.getClickHandlerAllSeminar(this.mainPanel));
		teams.addClickHandler(ClickHandlerFactory.getClickHandlerAllTeam(this.mainPanel));
		softwares.addClickHandler(ClickHandlerFactory.getClickHandlerAllSoftware(this.mainPanel));
		papers.addClickHandler(ClickHandlerFactory.getClickHandlerAllPaper(this.mainPanel));
	}


	@Override
	protected void onLoad() {
		super.onLoad();
		add(persons);
		add(seminars);
		add(teams);
		add(softwares);
		add(papers);
	}
	
	
}
